package com.geekaca.d3;

public class ForOddnum {
    public static void main(String[] args) {
        int sumOdd = 0;
        int count = 0;
        for (int i = 1; i <= 10; i++) {
            if (i % 2 == 1) {
//                System.out.println(i);
                sumOdd += i;
                System.out.println("sumOdd 值为:　" + sumOdd);
                count++;
            }

        }
        System.out.println("奇数和为: " + sumOdd + "奇数个数为：" + count);
    }
}
